package com.tgr.shortLink.project.common.convention.exception;


import com.tgr.shortLink.project.common.convention.errorCode.BaseErrorCode;
import com.tgr.shortLink.project.common.convention.errorCode.IErrorCode;

/**
 * 描述：
 * 作者：小陶不慌张
 * 文件：RemoteException
 * 日期：2023/12/22 19:16
 */

public class RemoteException extends AbstractException{
    public RemoteException(String message){
        this(message,null, BaseErrorCode.REMOTE_ERROR);
    }
    public RemoteException(IErrorCode errorCode){
        this(null,null,errorCode);
    }
    public RemoteException(String message, IErrorCode errorCode){
        this(message,null, errorCode);
    }
    public RemoteException(String message,Throwable throwable,IErrorCode errorCode){
        super(message,throwable,errorCode);
    }

    @Override
    public String toString(){
        return "RemoteException{"+
                "code='"+errorCode+"'"+
                "message='"+errorMessage+"'"+
                "}";
    }
}
